package com.zbkj.crmeb.enums;

/**
 * x
 *
 * @author muyu.myw
 * @date 2020/9/28 18:58
 */
public enum AreaTypeEnum {
    CN(1,"大陆"),
    HK(2,"港澳"),
    ABROAD(3, "海外");
    Integer type;
    String typeName;

    public Integer getType() {
        return type;
    }

    public String getTypeName() {
        return typeName;
    }

    private AreaTypeEnum(Integer type, String typeName){
        this.type = type;
        this.typeName = typeName;
    }
    public static AreaTypeEnum getTypeByCode(Integer type){
        if(type != null){
            for(AreaTypeEnum val : AreaTypeEnum.values()){
                if(val.type.equals(type)){
                    return val;
                }
            }
        }
        return HK;
    }
}
